#define _CRT_SECURE_NO_WARNINGS 1
#include "sort.h"

void testInsertSort()
{
	int arr[] = { 0,5,8,1,9,9,0,3,7,2,4,6 };
	insertSort(arr, sizeof(arr) / sizeof(int));
	disPlay(arr, sizeof(arr) / sizeof(int));
}

void testShellSort()
{
	int arr[] = { 0,5,8,1,9,9,0,3,7,2,4,6 };
	shellSort(arr, sizeof(arr) / sizeof(int));
	disPlay(arr, sizeof(arr) / sizeof(int));
}

void testSelectSort()
{
	int arr[] = { 0,5,8,1,9,9,0,3,7,2,4,6 };
	disPlay(arr, sizeof(arr) / sizeof(int));
	selectSort(arr, sizeof(arr) / sizeof(int));
	disPlay(arr, sizeof(arr) / sizeof(int));
}

void testHeapSort()
{
	int arr[] = { 0,5,8,1,9,9,0,3,7,2,4,6 };
	heapSort(arr, sizeof(arr) / sizeof(int));
	disPlay(arr, sizeof(arr) / sizeof(int));
}


void testBubbleSort()
{
	int arr[] = { 0,5,8,1,9,9,0,3,7,2,4,6 };
	bubbleSort(arr, sizeof(arr) / sizeof(int));
	disPlay(arr, sizeof(arr) / sizeof(int));
}


void testQuickSort01()
{
	int arr[] = { 0,5,8,1,9,9,0,3,7,2,4,6 };
	quickSort01(arr, 0,sizeof(arr) / sizeof(int)-1);
	disPlay(arr, sizeof(arr) / sizeof(int));
}


void testQuickSort02()
{
	int arr[] = { 5,5,8,1,9,9,0,3,7,2,4,6 };
	quickSort02(arr, 0, sizeof(arr) / sizeof(int) - 1);
	disPlay(arr, sizeof(arr) / sizeof(int));
}

void testQuickSort03()
{
	int arr[] = { 5,5,8,1,9,9,0,3,7,2,4,6 };
	quickSort03(arr, 0, sizeof(arr) / sizeof(int) - 1);
	disPlay(arr, sizeof(arr) / sizeof(int));
}
void testMergeSort()
{
	int arr[] = { 5,5,8,1,9,9,0,3,7,2,4,6 };
	mergeSort(arr, sizeof(arr) / sizeof(int) );
	disPlay(arr, sizeof(arr) / sizeof(int));
}


void testQuickSortNonR()
{
	int arr[] = { 5,5,8,1,9,9,0,3,7,2,4,6 };
	quickSortNonR(arr, sizeof(arr) / sizeof(int));
	disPlay(arr, sizeof(arr) / sizeof(int));
}

void testMergeSortNonR()
{
	int arr[] = { 5,5,8,1,9,9,0,3,7,2,4,6 };
	mergeSortNonR(arr, sizeof(arr) / sizeof(int));
	disPlay(arr, sizeof(arr) / sizeof(int));
}


void testCountSort()
{
	int arr1[] = { 5,5,8,1,9,9,0,3,7,2,4,6 };
	countSort(arr1, sizeof(arr1) / sizeof(int));
	disPlay(arr1, sizeof(arr1) / sizeof(int));
	int arr2[] = { 105,105,108,110,109,109,100,103,107,102,104,106 };
	countSort(arr2, sizeof(arr2) / sizeof(int));
	disPlay(arr2, sizeof(arr2) / sizeof(int));
}
int main()
{
	//testInsertSort();
	//testShellSort();
	//testSelectSort();
	//testHeapSort();
    //testBubbleSort();
	//testQuickSort01();
	//testQuickSort02();
	//testQuickSort03();
	//testMergeSort();
	//testQuickSortNonR();
	//testMergeSortNonR();
	testCountSort();
	return 0;
}